<template>
  <div class="wrapper">
    <swiper :options="swiperOption">
      <swiper-slide v-for="item of swiperList" :key="item.id">
        <img class="swiper-img" :src="item.imagURL" />
      </swiper-slide>
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  name: 'HomeSwiper',
  data: function () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true
      },
      swiperList: [{
        id: '0001',
        imagURL: 'http://img1.qunarzz.com/piao/fusion/1804/1b/6c766b79e2045102.jpg_750x200_29ad1225.jpg'
      }, {
        id: '0002',
        imagURL: 'http://img1.qunarzz.com/piao/fusion/1804/15/9250dbc86a456302.jpg_750x200_b423f532.jpg'
      }
      ]
    }
  }
}

</script>
<!-- >>>样式穿透-->
<style lang="stylus" scoped>
  .wrapper >>> .swiper-pagination-bullet-active {
    background #fff !important
  }
  .wrapper
    overflow: hidden
    width: 100%
    height: 0
    padding-bottom: 26.95%
    background #eee
    .swiper-img
      width 100%
</style>
